Implement a Go procedure in NetLogo code based on the pseudo-code. You can use the pseudo-code above, or if yours is different and you think it is better, use that. When you have it working, copy your code here.
Here are some commands you may find useful: with, not, any?, turtles-here, one-of, turtles-on, neighbors4, nobody, move-to, myself. Look them up in the Programming Guide if you don't know what they do.